//
//  YZNetworkManager+simulate.h
//  YZMicroStock
//
//  Created by apple on 16/12/12.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import "YZNetworkManager.h"

@interface YZNetworkManager (simulate)

/**
 *  获取模拟盘股票购买配置参数（跟用户相关）
 *
 *  @param success
 *  @param failure
 */
- (void)simU_getConfigureDataSuccess:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;

/**
 *  获取模拟盘账户余额
 *
 *  @param success
 *  @param failure
 */
- (void)simU_getBalanceDataSuccess:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;


/**
 *  第一次获取点卖列表数据
 *
 *  @param success
 *  @param failure
 */
- (void)simU_getSaleListFirstDataSuccess:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;


/**
 *  点买交易发起
 *
 *  @param stockCode     股票名称
 *  @param money         点买金额
 *  @param lever         模式
 *  @param quitGain      止盈金额
 *  @param quitLoss      止损金额
 *  @param principal     保证金
 *  @param serviceCharge 服务费
 *  @param stockCount    点买数量
 *  @param token
 *  @param success
 *  @param failure
 */
- (void)simU_submitTradeWithStockCode:(NSString *)stockCode andMoney:(NSString *)money andLever:(NSInteger)lever andQuitGain:(NSString *)quitGain andQuitLoss:(NSString *)quitLoss andPrincipal:(NSString *)principal andServiceCharge:(NSString *)serviceCharge andStockCount:(NSInteger)stockCount andToken:(NSString *)token success:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;

/**
 *  从缓存获取点卖列表数据
 *
 *  @param success
 *  @param failure
 */
- (void)simU_getSaleListFromMemcaDataSuccess:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;


/**
 *  获取已结算列表数据
 *
 *  @param success
 *  @param failure
 */
- (void)simU_getSettleListDataSuccess:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;

/**
 *  获取模拟炒股结算详情
 *
 *  @param tid     结算ID
 *  @param success
 *  @param failure
 */
- (void)simU_fetchTradeSettlementDetailWithID:(long long)tid success:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;

/**
 *  一元实盘点卖交易
 *
 *  @param tid             交易ID
 *  @param alwaysCloseFlag 是否递延
 *  @param success
 *  @param failure
 */
- (void)simU_closeTradeWithID:(long long)tid andAlwaysCloseFlag:(BOOL)alwaysCloseFlag success:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;


/**
 *  获取模拟盘基础数据
 *
 *  @param success
 *  @param failure
 */
- (void)simU_getBasicDataSuccess:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;


/**
 *  模拟炒股报名
 *  @param success
 *  @param failure
 */
- (void)simU_EnterUsersuccess:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;


/**
 *  获取模拟单股累计金额
 *
 *  @param stockCode
 *  @param success
 *  @param failure
 */
- (void)simU_fetchStockAmonutStatisticsWithStockCode:(NSString *)stockCode success:(void(^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;


@end
